package edu.hwadee.BEIS.entity;
// default package

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * CountyUser entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "county_user", catalog = "beis")

public class CountyUser implements java.io.Serializable {

	// Fields

	private String countyUserId;
	private Certificate certificate;
	private String countyUserPwd;
	private String countyUserPhone;
	private String countyEdbName;
	private String countyAddress;
	private String adminCode;

	// Constructors

	/** default constructor */
	public CountyUser() {
	}

	/** minimal constructor */
	public CountyUser(String countyUserId, Certificate certificate, String countyUserPwd, String countyUserPhone,
			String countyEdbName, String countyAddress, String adminCode) {
		this.countyUserId = countyUserId;
		this.certificate = certificate;
		this.countyUserPwd = countyUserPwd;
		this.countyUserPhone = countyUserPhone;
		this.countyEdbName = countyEdbName;
		this.countyAddress = countyAddress;
		this.adminCode = adminCode;
	}

	// Property accessors
	@Id

	@Column(name = "countyuser_id", unique = true, nullable = false, length = 50)

	public String getCountyUserId() {
		return this.countyUserId;
	}

	public void setCountyUserId(String countyUserId) {
		this.countyUserId = countyUserId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "certificate_id", nullable = false)

	public Certificate getCertificate() {
		return this.certificate;
	}

	public void setCertificate(Certificate certificate) {
		this.certificate = certificate;
	}

	@Column(name = "countyuser_pwd", nullable = false, length = 32)

	public String getCountyUserPwd() {
		return this.countyUserPwd;
	}

	public void setCountyUserPwd(String countyUserPwd) {
		this.countyUserPwd = countyUserPwd;
	}

	@Column(name = "countyuser_phone", nullable = false, length = 20)

	public String getCountyUserPhone() {
		return this.countyUserPhone;
	}

	public void setCountyUserPhone(String countyUserPhone) {
		this.countyUserPhone = countyUserPhone;
	}

	@Column(name = "county_edb_name", nullable = false, length = 20)

	public String getCountyEdbName() {
		return this.countyEdbName;
	}

	public void setCountyEdbName(String countyEdbName) {
		this.countyEdbName = countyEdbName;
	}

	@Column(name = "county_address", nullable = false, length = 50)

	public String getCountyAddress() {
		return this.countyAddress;
	}

	public void setCountyAddress(String countyAddress) {
		this.countyAddress = countyAddress;
	}

	@Column(name = "admin_code", nullable = false, length = 5)

	public String getAdminCode() {
		return this.adminCode;
	}

	public void setAdminCode(String adminCode) {
		this.adminCode = adminCode;
	}

}